name: "MindsDB CLA Assistant"
on:
  issue_comment:
    types: [created]
  pull_request_target:
    types: [opened,closed,synchronize]    
jobs:
  CLAssistant:
    runs-on: ubuntu-latest
    steps:
      - name: "CLA Assistant"
        if: (github.event.comment.body == 'recheckcla' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request'
        # Alpha Release
        uses: cla-assistant/github-action@v2.3.0
        env: 
          GITHUB_TOKEN: ${{ secrets.CLA_TOKEN }}          
          PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_TOKEN }}
        with: 
          path-to-signatures: 'assets/contributions-agreement/signatures/cla.json'
          # Add path to the CLA here
          path-to-document: 'https://github.com/mindsdb/mindsdb/blob/staging/assets/contributions-agreement/individual-contributor.md'
          branch: 'staging'
          allowlist: bot*, ZoranPandovski, torrmal, Stpmax, paxcema, mindsdbadmin, Ricram2, ea-rus, ilia-tsyplenkov, tomhuds
